home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / ctlhtmlc / messageb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-06  |  8.7 KB  |  344 lines

  1. /*---------------------------------------------------------------------------*\
  2.  | MessageBox.h - CtlHTML(tm) Control Library Test Program                   |
  3.  |                Windmill Point Software, Alburg, VT 05440                  |
  4.  |                Copyright (c) 1999, Windmill Point Software                |
  5.  |                All Rights Reserved.                                       |
  6. \*---------------------------------------------------------------------------*/
  7.  
  8. #if !defined(AFX_MESSAGEBOX_H__A05CD1C1_E0AC_11D2_8171_D0164FC10000__INCLUDED_)
  9. #define AFX_MESSAGEBOX_H__A05CD1C1_E0AC_11D2_8171_D0164FC10000__INCLUDED_
  10.  
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif // _MSC_VER > 1000
  14.  
  15. // constants
  16.  
  17. const int MaxButtonsCount  = 16;    // maximum buttons allowed in a message box
  18.  
  19.  
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CMessageBoxOptions dialog
  22.  
  23. class CMessageBoxOptions : public CPropertyPage
  24. {
  25.     DECLARE_DYNCREATE(CMessageBoxOptions)
  26.  
  27. // Construction
  28. public:
  29.     CMessageBoxOptions();
  30.     ~CMessageBoxOptions();
  31.  
  32. // Dialog Data
  33.     //{{AFX_DATA(CMessageBoxOptions)
  34.     enum { IDD = IDD_MESSAGEBOX_OPTIONS };
  35.     int        m_DefaultButton;
  36.     CString    m_DisplayInFutureText;
  37.     UINT       m_HelpID;
  38.     CString    m_MessageText;
  39.     int        m_ResourceIcon;
  40.     CString    m_ReturnValue;
  41.     int        m_StandardButtons;
  42.     int        m_StandardIcon;
  43.     int       m_Timeout;
  44.     CString    m_TitleText;
  45.     //}}AFX_DATA
  46.  
  47.    HTMLButtonList m_ButtonList[MaxButtonsCount + 1];
  48.    HTMLButtonList *m_pButtonList;
  49.    UINT     m_Flags;
  50.    UINT     m_IconNumber;
  51.  
  52.    CMcMRUList *m_pTitleMRU;
  53.    CMcMRUList *m_pMessageMRU;
  54.    CMcMRUList *m_pFutureMRU;
  55.  
  56. // Overrides
  57.     // ClassWizard generate virtual function overrides
  58.     //{{AFX_VIRTUAL(CMessageBoxOptions)
  59.     protected:
  60.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  61.     virtual BOOL OnInitDialog();
  62.     //}}AFX_VIRTUAL
  63.  
  64. // Implementation
  65. public:
  66.    void InitCombos ();
  67.  
  68. protected:
  69.     // Generated message map functions
  70.     //{{AFX_MSG(CMessageBoxOptions)
  71.     afx_msg void OnChangeStandardButtons();
  72.     afx_msg void OnCustomButtons();
  73.    afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized );
  74.     //}}AFX_MSG
  75.     DECLARE_MESSAGE_MAP()
  76. };
  77.  
  78. /////////////////////////////////////////////////////////////////////////////
  79. // CDetailsBoxOptions dialog
  80.  
  81. class CDetailsBoxOptions : public CPropertyPage
  82. {
  83.     DECLARE_DYNCREATE(CDetailsBoxOptions)
  84.  
  85. // Construction
  86. public:
  87.     CDetailsBoxOptions();
  88.     ~CDetailsBoxOptions();
  89.  
  90. // Dialog Data
  91.     //{{AFX_DATA(CDetailsBoxOptions)
  92.     enum { IDD = IDD_DETAILSBOX_OPTIONS };
  93.     int        m_DefaultButton;
  94.    CString  m_DetailsText;
  95.     CString    m_DisplayInFutureText;
  96.     UINT       m_HelpID;
  97.     CString    m_MessageText;
  98.     int        m_ResourceIcon;
  99.     CString    m_ReturnValue;
  100.     int        m_StandardButtons;
  101.     int        m_StandardIcon;
  102.     int       m_Timeout;
  103.     CString    m_TitleText;
  104.     //}}AFX_DATA
  105.  
  106.    HTMLButtonList m_ButtonList[MaxButtonsCount + 1];
  107.    HTMLButtonList *m_pButtonList;
  108.    UINT     m_Flags;
  109.    UINT     m_IconNumber;
  110.  
  111.    CMcMRUList *m_pTitleMRU;
  112.    CMcMRUList *m_pMessageMRU;
  113.    CMcMRUList *m_pDetailsMRU;
  114.    CMcMRUList *m_pFutureMRU;
  115.  
  116. // Overrides
  117.     // ClassWizard generate virtual function overrides
  118.     //{{AFX_VIRTUAL(CDetailsBoxOptions)
  119.     protected:
  120.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  121.     virtual BOOL OnInitDialog();
  122.     //}}AFX_VIRTUAL
  123.  
  124. // Implementation
  125. public:
  126.    void InitCombos ();
  127.  
  128. protected:
  129.     // Generated message map functions
  130.     //{{AFX_MSG(CDetailsBoxOptions)
  131.     afx_msg void OnChangeStandardButtons();
  132.     afx_msg void OnCustomButtons();
  133.    afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized );
  134.     //}}AFX_MSG
  135.     DECLARE_MESSAGE_MAP()
  136. };
  137.  
  138. /////////////////////////////////////////////////////////////////////////////
  139. // CFlashBoxOptions dialog
  140.  
  141. class CFlashBoxOptions : public CPropertyPage
  142. {
  143.     DECLARE_DYNCREATE(CFlashBoxOptions)
  144.  
  145. // Construction
  146. public:
  147.     CFlashBoxOptions();
  148.     ~CFlashBoxOptions();
  149.  
  150. // Dialog Data
  151.     //{{AFX_DATA(CFlashBoxOptions)
  152.     enum { IDD = IDD_FLASHBOX_OPTIONS };
  153.     CString    m_DisplayInFutureText;
  154.     CString    m_MessageText;
  155.     int        m_ResourceIcon;
  156.     int        m_StandardIcon;
  157.     int       m_Timeout;
  158.     CString    m_TitleText;
  159.     //}}AFX_DATA
  160.  
  161.    UINT     m_Flags;
  162.    UINT     m_IconNumber;
  163.  
  164.    CMcMRUList *m_pTitleMRU;
  165.    CMcMRUList *m_pMessageMRU;
  166.    CMcMRUList *m_pFutureMRU;
  167.  
  168. // Overrides
  169.     // ClassWizard generate virtual function overrides
  170.     //{{AFX_VIRTUAL(CFlashBoxOptions)
  171.     protected:
  172.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  173.     virtual BOOL OnInitDialog();
  174.     //}}AFX_VIRTUAL
  175.  
  176. // Implementation
  177. public:
  178.    void InitCombos ();
  179.  
  180. protected:
  181.     // Generated message map functions
  182.     //{{AFX_MSG(CFlashBoxOptions)
  183.    afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized );
  184.     //}}AFX_MSG
  185.     DECLARE_MESSAGE_MAP()
  186. };
  187.  
  188. /////////////////////////////////////////////////////////////////////////////
  189. // CMessageOptions
  190.  
  191. class CMessageOptions : public CMcPropertySheet
  192. {
  193.     DECLARE_DYNAMIC(CMessageOptions)
  194.  
  195. // Construction
  196. public:
  197.     CMessageOptions(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
  198.     CMessageOptions(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
  199.  
  200. // Attributes
  201. public:
  202.  
  203. // Operations
  204. public:
  205.  
  206. // Overrides
  207.     // ClassWizard generated virtual function overrides
  208.     //{{AFX_VIRTUAL(CMessageOptions)
  209.     public:
  210.     virtual BOOL OnInitDialog();
  211.     //}}AFX_VIRTUAL
  212.  
  213. // Implementation
  214. public:
  215.     virtual ~CMessageOptions();
  216.  
  217.    CMessageBoxOptions m_MessageBoxOptions;
  218.    CDetailsBoxOptions m_DetailsBoxOptions;
  219.    CFlashBoxOptions   m_FlashBoxOptions;
  220.  
  221.     // Generated message map functions
  222. protected:
  223.     //{{AFX_MSG(CMessageOptions)
  224.     afx_msg void OnDestroy();
  225.     afx_msg void OnTest();
  226.    afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized );
  227.     //}}AFX_MSG
  228.     DECLARE_MESSAGE_MAP()
  229. };
  230.  
  231. /////////////////////////////////////////////////////////////////////////////
  232. // CButtonList dialog
  233.  
  234. class CButtonList : public CDialog
  235. {
  236. // Construction
  237. public:
  238.     CButtonList(HTMLButtonList *pButtonList, CWnd* pParent = NULL);   // standard constructor
  239.  
  240. // Dialog Data
  241.     //{{AFX_DATA(CButtonList)
  242.     enum { IDD = IDD_BUTTON_LIST };
  243.     //}}AFX_DATA
  244.  
  245. // Overrides
  246.     // ClassWizard generated virtual function overrides
  247.     //{{AFX_VIRTUAL(CButtonList)
  248.     protected:
  249.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  250.     virtual BOOL OnInitDialog();
  251.     //}}AFX_VIRTUAL
  252.  
  253. // Implementation
  254. protected:
  255.    HTMLButtonList *m_pButtonList;
  256.    void EnableButtons();
  257.  
  258.     // Generated message map functions
  259.     //{{AFX_MSG(CButtonList)
  260.     afx_msg void OnEditItem();
  261.     afx_msg void OnNewItem();
  262.     afx_msg void OnRemoveAll();
  263.     afx_msg void OnRemoveItem();
  264.    afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized );
  265.     //}}AFX_MSG
  266.     DECLARE_MESSAGE_MAP()
  267. };
  268.  
  269. /////////////////////////////////////////////////////////////////////////////
  270. // CAddButton dialog
  271.  
  272. class CAddButton : public CDialog
  273. {
  274. // Construction
  275. public:
  276.     CAddButton(CWnd* pParent = NULL);   // standard constructor
  277.  
  278. // Dialog Data
  279.     //{{AFX_DATA(CAddButton)
  280.     enum { IDD = IDD_ADD_BUTTON };
  281.     UINT    m_ID;
  282.     int    m_InsertAfter;
  283.     BOOL    m_IsDefault;
  284.     CString    m_Name;
  285.     //}}AFX_DATA
  286.  
  287. // Overrides
  288.     // ClassWizard generated virtual function overrides
  289.     //{{AFX_VIRTUAL(CAddButton)
  290.     protected:
  291.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  292.     //}}AFX_VIRTUAL
  293.  
  294. // Implementation
  295. protected:
  296.  
  297.     // Generated message map functions
  298.     //{{AFX_MSG(CAddButton)
  299.    afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized );
  300.     //}}AFX_MSG
  301.     DECLARE_MESSAGE_MAP()
  302. };
  303.  
  304. /////////////////////////////////////////////////////////////////////////////
  305. // CEditButton dialog
  306.  
  307. class CEditButton : public CDialog
  308. {
  309. // Construction
  310. public:
  311.     CEditButton(CWnd* pParent = NULL, LPCTSTR title = 0);   // standard constructor
  312.  
  313. // Dialog Data
  314.     //{{AFX_DATA(CEditButton)
  315.     enum { IDD = IDD_EDIT_BUTTON };
  316.     UINT    m_ID;
  317.     BOOL    m_IsDefault;
  318.     CString    m_Name;
  319.     //}}AFX_DATA
  320.  
  321. // Overrides
  322.     // ClassWizard generated virtual function overrides
  323.     //{{AFX_VIRTUAL(CEditButton)
  324.     protected:
  325.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  326.     virtual BOOL OnInitDialog();
  327.     //}}AFX_VIRTUAL
  328.  
  329. // Implementation
  330. protected:
  331.    LPCTSTR m_Title;
  332.  
  333.     // Generated message map functions
  334.     //{{AFX_MSG(CEditButton)
  335.    afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized );
  336.     //}}AFX_MSG
  337.     DECLARE_MESSAGE_MAP()
  338. };
  339.  
  340. // {{AFX_INSERT_LOCATION}}
  341. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  342.  
  343. #endif // !defined(AFX_MESSAGEBOX_H__A05CD1C1_E0AC_11D2_8171_D0164FC10000__INCLUDED_)
  344.